package hlhj.fhp.checkpoint.customView

import android.app.Dialog
import android.content.Context
import android.os.Bundle
import android.view.View
import hlhj.fhp.checkpoint.R
import kotlinx.android.synthetic.main.dialog_choose_type.*

/**
 * Created by Never Fear   on 2018\11\19 0019.
Never More....
 */
class ChooseLevelDialog(c: Context, private val clickResultListener: ClickResultListener) : Dialog(c, R.style.MyDialog) {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.dialog_choose_type)
        btBig.text="A级"
        btSmall.text="B级"

        btBig.setOnClickListener {
            clickResultListener.click("A级")
            dismiss()
        }
        btSmall.setOnClickListener {
            clickResultListener.click("B级")
            dismiss()
        }
    }

    interface ClickResultListener{
        fun click(type:String)
    }

}